#ifndef HAL_PWM_H
#define HAL_PWM_H

#include "HalCtype.h"

#define HAL_PWM_OUT_CH_COUNT 12

typedef struct
{
    GPIO_TypeDef *port;
    unsigned short pin;
} HalPWMIO_t;

typedef struct
{
    char enable;
    unsigned short duty;
    HalPWMIO_t io;
} HalPWMInfo_t;

void HalPWMDutySet(uint8_t ch, uint16_t val);
void HalPWMChannelStart(uint8_t ch, uint16_t duty, GPIO_TypeDef *port, uint16_t pin);
void HalPWMInitialize(void);
#endif
